package net.monare.mifss.evn;

import net.monare.mifss.admin.ui.comp.PropertyListUi;

import com.vaadin.server.ClientConnector.DetachEvent;
import com.vaadin.server.ClientConnector.DetachListener;

public class ProperyFieldDetachListener implements DetachListener{

	private static final long serialVersionUID = 2892375010228050168L;

	private PropertyListUi parent;
	
	public ProperyFieldDetachListener(PropertyListUi propertyListUi) {
		this.parent = propertyListUi;
	}


	public void detach(DetachEvent event) {
		
		if(parent.getPropertyCount() == 0){
			parent.clearLabels();
		}

	}

}
